home *** CD-ROM | disk | FTP | other *** search
/ Linux Cubed Series 7: Sunsite / Linux Cubed Series 7 - Sunsite Vol 1.iso / system / admin / linuxcon.000 / linuxcon / linuxconf-1.6 / xconf / xconf1.c < prev    next >
C/C++ Source or Header  |  1996-05-07  |  775b  |  34 lines

  1. #include <string.h>
  2. #include <sys/stat.h>
  3. #include "../paths.h"
  4. #include "../misc/misc.h"
  5. #include "xconf.h"
  6.  
  7.  
  8. static HELP_FILE help_xconf ("xconf","intro");
  9. static CONFIG_FILE xfconf (ETC_XF86CONFIG,help_xconf
  10.     ,CONFIGF_PROBED | CONFIGF_OPTIONNAL);
  11. /*
  12.     Try to find out if the graphic mode is minimally configured
  13.     Return != 0 if so.
  14.     
  15.     status contain some explanation on what is missing.
  16. */
  17. int xconf_xok (char *status)
  18. {
  19.     struct stat buf;
  20.     int ret = 0;
  21.     status[0] = '\0';
  22.     if (!xfconf.exist()){
  23.         strcpy (status,xfconf.getpath());
  24.         strcat (status," does not exist\n");
  25.     }else if (stat(USR_BIN_X11_X,&buf)==-1){
  26.         strcpy (status,xfconf.getpath());
  27.         strcat (status," do exist\n");
  28.         strcat (status,"but " USR_BIN_X11_X " does not\n");
  29.     }else{
  30.         ret = 1;
  31.     }
  32.     return ret;
  33. }    
  34.